package com.bawei.mall.user.remote;

import com.bawei.common.core.constant.ServiceNameConstants;
import com.bawei.common.core.domain.R;
import com.bawei.common.core.web.page.TableDataInfo;
import com.bawei.mall.user.domain.request.UserInformati;
import com.bawei.mall.user.factory.RemoteUserFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author DongZl
 * @description: 商品远程调用
 * @Date 2022-10-15 上午 08:40
 */
@FeignClient(contextId = "remoteUserInfoService", value = ServiceNameConstants.USER_SERVICE,
        fallbackFactory = RemoteUserFallbackFactory.class)
public interface RemoteUserInfo {

    /**
     * 功能：根据账号查询用户信息
     * @param username
     * @return
     */
    @GetMapping("user/getUser/{username}")
    public R<UserInformati> getUser(@PathVariable(value = "username") String username);

}
